const Sequelize=require("sequelize");
const dataName='test',
const userName='root',
const userPass='root'


const sequelize=new Sequelize(dataName,userName,userPass,{
    port:3306,
    host:"localhost",
    dialect:"mysql",//数据库类型
    operatorsAliases: false,
    // 设置时间字段返回值格式为 年月日时分秒
    dialectOptions: {
      dateStrings: true,
      typeCast: true
    },
    // 东八时区
    timezone: '+08:00',
    //连接池
    pool: {
      max: 5,
      min: 0,
      acquire: 30000,//等待连接的时间
      idle: 10000 //闲置连接超过多少毫秒被释放
    },
    logging: databaseLogging
})


module.exports={
    Sequelize,
    sequelize
}
